Skip to content

fix(id): validate /input in the plain world join pump (#3134) - #3731

Merged
dezren39 merged 1 commit into
mainfrom
queue/5640-3134-world-pump-input-fix
Nov 3, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5640-3134-world-pump-input-fix

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Fixes #3134. Queue task 5640.

The plain id world join pump bypassed the shared line grammar for /input: it sent unvalidated hex to the server and posted a bare /input as chat. This routes the plain pump through the same mapping shape as command mode:

  • New pump_plain() in pkgs/id/src/commands/world.rs: non-/input lines are sent as chat unchanged; /input lines go through world_line::parse_line — valid hex is normalized (uppercase → lowercase) into the input frame, bare/non-hex/odd-length /input is answered locally with usage: /input <hex> and sends no frame.
  • The stdin loop now matches on the shared PumpLine result for both pump paths.

Tests (run on the laptop, per fleet CI-first/laptop policy):

  • cargo test --manifest-path pkgs/id/Cargo.toml --lib commands::world::tests --locked — 8 passed, including the new regression test the_plain_pump_validates_input_and_preserves_chat (valid, uppercase, two-space, non-hex, odd-length, bare /input, ordinary chat).
  • cargo test --manifest-path pkgs/id/Cargo.toml --lib world_line::tests --locked — 5 passed.

--json output unchanged; no behaviour change beyond both pump paths obeying the shared grammar.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 14:41
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ff3c2b29-69f4-4397-b8cb-38fe9835a04b
Commits

Reviewing files that changed from the base of the PR and between 710652d and d886ce6.

Files selected for processing: 1
  • pkgs/id/src/commands/world.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T16:21:34.501753Z
We couldn’t complete this review. Comment @codex review to try again.
d886ce6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 force-pushed the queue/5640-3134-world-pump-input-fix branch from 6e31d6a to d886ce6 Compare November 3, 2026 16:21
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Agent note — shepherded: rebased onto main, tests green (queue task 8419, lane I)

  • Rebased queue/5640-3134-world-pump-input-fix onto current main (f4fce2b90): 6e31d6a → d886ce6. The pump-match conflict was resolved by unifying on the PR's pump_plain/pump_command split while keeping main's PumpLine::Say { level, message } handling (JSON transcript record in --json mode, stderr otherwise) for both modes. Main's local_transcript_records_have_stable_shape_and_error_level test is kept alongside the PR's regression test.
  • One deliberate deviation from the task packet: it described the usage text as level "info", "matching pump_command's convention". In the code, world_line::parse_line returns invalid /input forms as WorldLine::Message("usage: /input <hex>"), and pump_command maps WorldLine::Message to level "error" — so the plain pump now does exactly the same (level "error"), and the regression test pins that. The unreachable fallback arm keeps "info". This makes the two pumps consistent for the identical grammar message, which is the convention the packet pointed at.
  • Tests (laptop, this run): cargo test --manifest-path pkgs/id/Cargo.toml --lib commands::world::tests --locked — 12 passed; cargo test --manifest-path pkgs/id/Cargo.toml --lib world_line::tests --locked — 6 passed. (First run caught the level mismatch above: 11 passed / 1 failed before the test expectation was corrected.)
  • Codex: the review run for head d886ce6 failed on Codex usage limits and produced zero inline findings (same state recorded on other fleet PRs today); there are no Codex findings to disposition.
  • Merging under the standing criteria: diff is the single intended file (+68/-17 vs main), focused suites pass, no held/Drew-owned labels on id(world): the plain id world join pump bypasses the shared line grammar for /input — unvalidated hex is sent to the server and dropped, a bare /input is posted as chat, and the two-space form is accepted here but rejected by the grammar #3134 or this PR.

@dezren39
dezren39 merged commit 1c1aa4a into main Nov 3, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/5640-3134-world-pump-input-fix branch November 3, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant